using System;
using System.Collections;
using System.Text;
using System.Configuration;
using System.Xml;

namespace Services.WCF.Hosting
{
    public class ServiceConfigurationHandler : ConfigurationSection
    {
        public ServiceConfigurationHandler()
        {
        }

        public ServiceConfigurationHandler(String EndPoint)
        {
            this.EndPoint = EndPoint;
        }

        [ConfigurationProperty("endpoint", DefaultValue = "http://{0}:1400/{1}", IsRequired = true)]
        public String EndPoint
        {
            get
            { return (String)this["endpoint"]; }
            set
            { this["endpoint"] = value; }
        }

        [ConfigurationProperty("hostController", DefaultValue = "", IsRequired = false)]
        public String HostControler
        {
            get
            { return (String)this["hostController"]; }
            set
            { this["hostController"] = value; }
        }


        [ConfigurationProperty("subscriber", DefaultValue = "", IsRequired = false)]
        public String Subscriber
        {
            get
            { return (String)this["subscriber"]; }
            set
            { this["subscriber"] = value; }
        }
        
        [ConfigurationProperty("services",IsRequired = false)]
        public ServiceConfigurationElementCollection Services
        {
            get
            { return (ServiceConfigurationElementCollection)this["services"]; }
            set
            { this["services"] = value; }
        }
    }

}
